<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/templates/template.xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:nu="http://nu.jcperera.homeip.net/facelets" xmlns:p="http://primefaces.org/ui">

	<ui:param name="title" value="NU Application List Web Info Sites Page" />

	<ui:define name="body">
		<p:panel id="list-panel" header="List of Web Info Sites" style="margin-bottom:10px;">
			<p:messages autoUpdate="true" closable="false" showDetail="true" redisplay="no" />

			<p:dataTable id="webInfoSiteTable" var="webInfoSite" value="#{webInfoSiteBean.allWebInfoSites}"
				widgetVar="webInfoSitesTable" emptyMessage="No Web Info Sites found with given criteria"
				rowKey="#{webInfoSite.entityid}" paginator="true" rows="15" selection="#{webInfoSiteBean.selectedWebInfoSite}"
				selectionMode="single" style="margin-bottom:10px;">

				<p:ajax event="rowSelect" listener="#{webInfoSiteBean.onRowSelect}" />

				<p:column id="idColumn" headerText="Id" width="5%">
					<h:outputText value="#{webInfoSite.entityid}" />
				</p:column>

				<p:column id="urlColumn" headerText="URL" width="25%">
					<h:outputText value="#{webInfoSite.url}" />
				</p:column>

				<p:column id="parametersColumn" headerText="Parameters" width="20%">
					<h:outputText value="#{webInfoSite.parameters}" />
				</p:column>

				<p:column id="createdByColumn" headerText="Created By" width="10%">
					<h:outputText value="#{webInfoSite.createdBy}" />
				</p:column>

				<p:column id="createdWhenColumn" headerText="Created When" width="10%">
					<h:outputText value="#{webInfoSite.createdWhenAsDate}">
						<f:convertDateTime dateStyle="short" timeZone="EST" type="both" />
					</h:outputText>
				</p:column>

				<p:column id="modifiedByColumn" headerText="Modified By" width="10%">
					<h:outputText value="#{webInfoSite.modifiedBy}" />
				</p:column>

				<p:column id="modifiedWhenColumn" headerText="Modified When" width="10%">
					<h:outputText value="#{webInfoSite.modifiedWhenAsDate}">
						<f:convertDateTime dateStyle="short" timeZone="EST" type="both" />
					</h:outputText>
				</p:column>

				<p:column id="localVersionColumn" headerText="Local" width="5%">
					<h:outputText value="#{webInfoSite.localVersion}" />
				</p:column>

				<p:column id="globalVersionColumn" headerText="Global" width="5%">
					<h:outputText value="#{webInfoSite.globalVersion}" />
				</p:column>
			</p:dataTable>
			
			<p:button value="Create New" outcome="/pages/webinfosite/new.xhtml?faces-redirect=true" process="@this"/>
		</p:panel>
	</ui:define>
</ui:composition>